This invention relates to a data processing system for compensating for a power failure in an apparatus for selling betting tickets in a ticket selling and collecting system.
This invention relates to U.S. Pat. No. 4,032,946 by Yuzo Wakatuki, Masanobu Miyake, Kazuyuki Hano issued June 28, 1977 and U.S. Pat. No. 4,108,364 by Takehiko Tanaka, Yuzo Wakatsuki, Toshio Niiya issued Aug. 22, 1978.
In the case of horse races and cycle races, the so called ticket selling and betting job is essential, wherein the betting tickets are sold to audiences and repayment is made to those having winning tickets. The computerized system for such jobs is called a totalizator system, which is composed of a large amount of terminal equipment (hereinafter referred to as apparatus for selling betting tickets) for selling betting tickets and a small amount of ticket collecting apparatus. In the totalizator system, the number of tickets sold must be accurately counted, the, amount of money bet on the same number, the money sum of all the betting tickets and the amount of repayment for the winning tickets must be quickly and accurately calculated. If the number or amount of tickets is miscounted the repayment of the winning tickets also becomes incorrect. As a result, the promotor pays more or less money than the correct amount and the reliability of the system drastically deteriorates.
Therefore, the totalizator is always required to correctly and stably operate even if there are many external disturbances.
The most serious external disturbance is power failure. In present electronics technology it is easy to stably and correctly operate a system which is designed on the basis of a specified power supply voltage, so long as the specified voltage and frequency are supplied from the power supply system. However, if the system power supply voltage drops while the system is operating, the system of course stops operating and temporarily falls into an unstable state.
If the system breaks down, the races can no longer be continued. Therefore in some cases a non-breaking power supply system is provided for the totalization system. But in some cases such a system can not be provided mainly because of economical reasons.
In such a case, since temporary suspension of the job due to power failure is inevitable, it is essential that the system be able to start operating again immediately after the power supply is restored.
Generally, if power failure or trouble occurs in the computer system or a part of it, operation can easily be reinstated by initialization of the operating process when such trouble occurs.
However in the case of the totalizator system, it is almost impossible to recollect the betting tickets once they are sold. For this reason, if power failure occurs, it is necessary to freeze the state of the system at the moment such power failure occurs and to restart the operation accurately from that state when the power supply is restored.
Such control is sufficiently possible in the closed loop of the electronics.
Namely, the occurrence of power failure is detected by an external signal, every operation is suspended at a time, and every state at this time is stored in the nonvolatile memory. When the power failure is repaired operation can be started again from the point where the power failure occurred.
However, in a large scale system such as a totalizator system, many apparatuses for selling betting tickets are connected to the system and are operated in parallel. Therefore the totalizator system requires special controls.
Data handling between the apparatus for selling betting tickets and the collecting apparatus will be explained by referring to FIG. 1 and FIG. 2.
In these figures, 1 is the CPU (Central Processing Unit), 2 is the collecting file, 3 is the communication control unit, 4 is the collecting apparatus, 5 is the transmission line, 6 is the apparatus for selling betting tickets, 7 is the memory, 8 is the interface control unit, 9 is the control unit, 10 is the ticket printing unit, 11 is the panel display unit, 12 is the keyboard and 13 is the journal printing unit.
A drawing illustrating the apparatus for selling betting tickets is shown in FIG. 2 of U.S. Pat. No. 4,032,946 and U.S. Pat. No. 4,108,364, and the overall block diagram is illustrated in FIG. 4 and FIG. 5 of U.S. Pat. No. 4,032,946 and in FIG. 4 of U.S. Pat. No. 4,108,364. The ticket printing unit is shown in FIG. 6 of U.S. Pat. No. 4,032,946, while the panel display unit and keyboard are shown in FIG. 3 of U.S. Pat. No. 4,032,946 and U.S. Pat. No. 4,108,364. An example of the printed betting tickets is shown in FIG. 1 and FIG. 7 of U.S. Pat. No. 4,032,946 and in FIG. 1 of the U.S. Pat. No. 4,108,364. Therefore, a detailed explanation is unnecessary.
FIG. 2 (1) shows the operating time chart where there is no request for ticket selling to the apparatus for selling betting tickets.
When a message "ENQ" is sent to the apparatus for selling betting tickets 6 from the collecting apparatus 4 by the polling system, enquiring as to a request for ticket selling, this signal is transmitted to the interface control unit 8 of the apparatus for selling betting tickets via the transmission line 5 and is then sent to the control unit 9.
The control unit 9 returns the message "ACK" to the collecting apparatus 4 via the interface control unit 8 and transmission line 5. The message "ACK" means there have been requests for ticket selling.
The collecting apparatus 4 decodes this "ACK" message and then polling is transferred to the next apparatus for selling betting tickets.
FIG. 2 (2) shows the operating time chart where a request for ticket selling is issued to the apparatus for selling betting tickets 6. The operations of the apparatus for selling betting tickets 6 and collecting apparatus 4 in this case will now be explained.
1 The operator inputs the betting data given from a bettor to the apparatus for selling betting tickets 6 from the keyboard 12. The betting data is stored in the memory 7 via the control unit 9 within the apparatus for selling betting tickets and simultaneously displayed on the panel display unit 11.
2 When all betting data of a bettor is input, the operator presses the "SEND" key which is not illustrated.
3 After receiving the message "ENQ" which is sent from the collecting apparatus, the apparatus for selling betting tickets sends the message indicating requested ticket selling and betting data stored in the memory 7 to the collecting apparatus 4 via the control unit 9, interface control unit 8 and transmission line 5.
4 The abovementioned betting data are sent to the CPU 1 via the communication control unit 3 of the data collecting apparatus 4. This betting data is checked to see whether or not ticket selling should be allowed. This is processing 1.
5 Upon completion of the above processing, the CPU 1 returns the answer to the apparatus for selling betting tickets using a ticket selling allowing signal.
6 Upon receiving the ticket selling allowing signal, the control unit 9 of the apparatus for selling betting tickets 6 returns the "ACK" signal to the data collecting apparatus.
7 Then, the control unit 9 of the apparatus for selling betting tickets issues a command for starting ticket selling. Thus, the ticket selling data being stored in the memory 7 is sent to the printing unit 10, printing the data on the ticket and simultaneously the spare ticket is also printed by the journal printing unit 13.
8 The betting ticket is issued.
9 After receiving the message "ACK" from the apparatus for selling betting tickets 6, the collecting apparatus 4 knows that the ticket selling command is received by the apparatus for selling betting tickets 6 and updates the contents of collecting file 2 in the collecting apparatus 4 in accordance with the abovementioned betting ticket data. This is processing 2. Upon completion of processing 2, the polling for the next apparatus for selling betting tickets is performed. Here, the time of ticket selling operation is important. Usually, the ticket selling operation takes a time from several hundred milli-seconds to two seconds because it is a mechanical operation. Essentially, the collecting file should be updated after completion of the ticket selling operation. But it makes the processing speed of the CPU slow. Thus, the file is updated when it is confirmed that the apparatus for selling betting tickets has received the data. Thereafter, although it is inevitable, as many apparatus for selling betting tickets is expected to sell the tickets as are updated in the file. As an alternative method, data could be sent to the CPU when the apparatus for selling betting tickets completes a cycle of operation. But this deteriorates efficiency because repeated CPU service is required.
Next the occurrence of the timing of power failure in the apparatus for selling betting tickets is considered in a series of sequence shown in FIG. 2 (2). t1 is the timing until the apparatus for selling betting tickets and the collecting apparatus agree on the ticket selling contract. If a power failure occurs during this timing, there is no inconsistency between these apparatus because the collecting apparatus does not update the file and the apparatus for selling betting tickets does not sell tickets. However, if a power failure occurs during the timing t2, ticket selling of the apparatus for selling betting tickets becomes disabled and file updating the collecting apparatus is completed. Therefore, if the power failure occurs during the timing t2, this error must be corrected after restoration of the power supply. Here, a correcting method is necessary. If power failure occurs during the timing t2, the ticket may be in any of the following condition: it entirely disappears, it is imperfectly printed or it is printed but is not appearing from the ticket outlet and remains on the inside. However, if such tickets are all to be wasted, no difference between the file contents and number of tickets sold occurs if these tickets are subtracted from the file and the ticket selling job is restarted. Next, the problem of what kind of data should be subtracted will be considered. In the conventional method, the data which has been handled by the operator is estimated from the imperfectly printed betting tickets or form journals (spare tickets), or the data to be subtracted on the basis of the operator's memory is sent to the collecting apparatus and then it is subtracted from the file of collecting apparatus. However, such a method has the disadvantage that it is likely to result in mistakes.